package Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TipMapper {

    //功能:根据id查询tip内容
    @Select("select content from moodtips where tips_id = #{id}")
    public String getTip(@Param("id")  int id);


    //获取当前数据库中的所有记录数量
    @Select("select count(tips_id) from moodtips")
    public int getTotal();
}
